<?php
/**
 * 主页
 */
namespace  app\index\controller;


use think\Db;
use think\Request;

class JourController extends BaseController{

    private $foot;

    public function _initialize(){
        $this->foot=$this->foot();

    }

    //列表
    public function lst(){
        $data = Db::table('jour')
            ->where('delete_time',null)
            ->where('status',1)
            ->order('orders desc')
            ->limit(10)
            ->select();
        $this->assign([
            'data' => $data,
            'foot'=>$this->foot,

        ]);
        return $this->fetch('jour/lst');
    }

    //详情
    public function detail(){
        $id = $this->request->param('id');
        $info = Db::table('jour')->where('id',$id)->find();
        $this->assign([
            'info' => $info,
            'foot'=>$this->foot,

        ]);
        return $this->fetch('jour/details');
    }
}
